-- mysql sql to oracle sql by chen
--建立一个默认表通用sequence序列 
CREATE SEQUENCE SEQ_ALL_TEMP INCREMENT BY 1 START WITH 1;
-- 菜单
CREATE TABLE "HEWENFENG"."sys_menu" (
  "menu_id" NUMBER NOT NULL,
  "parent_id" NUMBER,
  "name" VARCHAR2(50 BYTE),
  "url" VARCHAR2(200 BYTE),
  "perms" VARCHAR2(500 BYTE),
  "type" int,
  "icon" VARCHAR2(50 BYTE),
  "order_num" int,
   PRIMARY KEY ("menu_id")
);
 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_menu_TEMP
   BEFORE INSERT ON "sys_menu"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."menu_id" FROM DUAL;
 END;
-- 系统用户
CREATE TABLE "HEWENFENG"."sys_user" (
  "user_id" NUMBER NOT NULL ,
  "username" VARCHAR2(50 BYTE) NULL ,
  "password" VARCHAR2(100 BYTE) NULL ,
  "email" VARCHAR2(100 BYTE) NULL ,
  "mobile" VARCHAR2(100 BYTE) NULL ,
  "status" int,
  "create_time" DATE NULL,
  PRIMARY KEY ("user_id")
);
 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_user_TEMP
   BEFORE INSERT ON "sys_user"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."user_id" FROM DUAL;
 END;
-- 角色
CREATE TABLE "HEWENFENG"."sys_role" (
  "role_id" NUMBER NOT NULL,
  "role_name" VARCHAR2(100 BYTE) NULL ,
  "remark" VARCHAR2(100 BYTE) NULL ,
  "create_time" DATE NULL,
  PRIMARY KEY ("role_id")
) ;
 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_role_TEMP
   BEFORE INSERT ON "sys_role"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."role_id" FROM DUAL;
 END;
-- 用户与角色对应关系
CREATE TABLE "HEWENFENG"."sys_user_role" (
  "id" NUMBER NOT NULL,
  "user_id" NUMBER NULL,
  "role_id" NUMBER NULL,
  PRIMARY KEY ("id")
);

 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_urole_TEMP
   BEFORE INSERT ON "sys_user_role"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."id" FROM DUAL;
 END;
-- 角色与菜单对应关系
CREATE TABLE "HEWENFENG"."sys_role_menu" (
  "id" NUMBER NOT NULL,
  "role_id" NUMBER NULL,
  "menu_id" NUMBER NULL,
  PRIMARY KEY ("id")
);
 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_rmenu_TEMP
   BEFORE INSERT ON "sys_role_menu"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."id" FROM DUAL;
 END;

-- 系统配置信息
CREATE TABLE "HEWENFENG"."sys_config" (
	"id" NUMBER NOT NULL,
	"key" VARCHAR2(50 BYTE),
	"value" VARCHAR2(2000 BYTE),
	"status" int,
	"remark" VARCHAR2(500 BYTE),
	PRIMARY KEY ("id")
);
 --建立一个触发器: 
CREATE OR REPLACE TRIGGER TRG_config_TEMP
   BEFORE INSERT ON "sys_config"
   FOR EACH ROW
 BEGIN
   SELECT SEQ_ALL_TEMP.NEXTVAL INTO :NEW."id" FROM DUAL;
 END;

-- 初始数据 
INSERT INTO "HEWENFENG"."sys_user" ("user_id", "username", "password", "email", "mobile", "status", "create_time") VALUES ('1', 'admin', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 'root@renren.io', '13612345678', '1', TO_DATE('2017-05-05 15:24:47', 'YYYY-MM-DD HH24:MI:SS'));
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('1', '0', '系统管理', NULL, NULL, '0', 'fa fa-cog', '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('2', '1', '管理员列表', 'sys/user.html', NULL, '1', 'fa fa-user', '1');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('3', '1', '角色管理', 'sys/role.html', NULL, '1', 'fa fa-user-secret', '2');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('4', '1', '菜单管理', 'sys/menu.html', NULL, '1', 'fa fa-th-list', '3');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('5', '1', 'SQL监控', 'druid/sql.html', NULL, '1', 'fa fa-bug', '4');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('6', '1', '定时任务', 'sys/schedule.html', NULL, '1', 'fa fa-tasks', '5');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('7', '6', '查看', NULL, 'sys:schedule:list,sys:schedule:info', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('8', '6', '新增', NULL, 'sys:schedule:save', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('9', '6', '修改', NULL, 'sys:schedule:update', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('10', '6', '删除', NULL, 'sys:schedule:delete', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('11', '6', '暂停', NULL, 'sys:schedule:pause', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('12', '6', '恢复', NULL, 'sys:schedule:resume', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('13', '6', '立即执行', NULL, 'sys:schedule:run', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('14', '6', '日志列表', NULL, 'sys:schedule:log', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('15', '2', '查看', NULL, 'sys:user:list,sys:user:info', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('16', '2', '新增', NULL, 'sys:user:save,sys:role:select', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('17', '2', '修改', NULL, 'sys:user:update,sys:role:select', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('18', '2', '删除', NULL, 'sys:user:delete', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('19', '3', '查看', NULL, 'sys:role:list,sys:role:info', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('20', '3', '新增', NULL, 'sys:role:save,sys:menu:perms', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('21', '3', '修改', NULL, 'sys:role:update,sys:menu:perms', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('22', '3', '删除', NULL, 'sys:role:delete', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('23', '4', '查看', NULL, 'sys:menu:list,sys:menu:info', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('24', '4', '新增', NULL, 'sys:menu:save,sys:menu:select', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('25', '4', '修改', NULL, 'sys:menu:update,sys:menu:select', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('26', '4', '删除', NULL, 'sys:menu:delete', '2', NULL, '0');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('27', '1', '参数管理', 'sys/config.html', 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', '1', 'fa fa-sun-o', '6');
INSERT INTO "HEWENFENG"."sys_menu" ("menu_id", "parent_id", "name", "url", "perms", "type", "icon", "order_num") VALUES ('28', '1', '代码生成器', 'sys/generator.html', 'sys:generator:list,sys:generator:code', '1', 'fa fa-rocket', '7');



-- 定时任务
CREATE TABLE "HEWENFENG"."schedule_job" (
  "job_id" NUMBER NOT NULL ,
  "bean_name"  VARCHAR22(200 BYTE) DEFAULT NULL,
  "method_name" VARCHAR22(100 BYTE) DEFAULT NULL,
  "params" VARCHAR22(2000 BYTE) DEFAULT NULL,
  "cron_expression" VARCHAR22(100 BYTE) DEFAULT NULL,
  "status" int,
  "remark" VARCHAR22(255 BYTE) DEFAULT NULL,
  "create_time" DATE NULL ,
  PRIMARY KEY ("job_id")
) ;

-- 定时任务日志
CREATE TABLE "HEWENFENG"."schedule_job_log" (
  "log_id" NUMBER NOT NULL ,
  "job_id" NUMBER NOT NULL ,
  "bean_name" VARCHAR2(200 BYTE) DEFAULT NULL,
  "method_name" VARCHAR2(100 BYTE) DEFAULT NULL,
  "params" VARCHAR2(2000 BYTE) DEFAULT NULL,
  "status" int,
  "error" VARCHAR2(2000 BYTE) DEFAULT NULL,
  "times" int,
  "create_time" DATE NULL ,
  PRIMARY KEY ("log_id")
);



--  quartz相关表结构
CREATE TABLE "HEWENFENG".QRTZ_JOB_DETAILS(
SCHED_NAME VARCHAR2(120 BYTE) DEFAULT NULL,
JOB_NAME VARCHAR2(200 BYTE) DEFAULT NULL,
JOB_GROUP VARCHAR2(200 BYTE) DEFAULT NULL,
DESCRIPTION VARCHAR2(250 BYTE) DEFAULT NULL,
JOB_CLASS_NAME VARCHAR2(250 BYTE) DEFAULT NULL,
IS_DURABLE VARCHAR2(1 BYTE) DEFAULT NULL,
IS_NONCONCURRENT VARCHAR2(1 BYTE) DEFAULT NULL,
IS_UPDATE_DATA VARCHAR2(1 BYTE) DEFAULT NULL,
REQUESTS_RECOVERY VARCHAR2(1 BYTE) DEFAULT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP));


CREATE TABLE "HEWENFENG".QRTZ_TRIGGERS (
SCHED_NAME VARCHAR2(120 BYTE) DEFAULT NULL,
TRIGGER_NAME VARCHAR2(200 BYTE) DEFAULT NULL,
TRIGGER_GROUP VARCHAR2(200 BYTE) DEFAULT NULL,
JOB_NAME VARCHAR2(200 BYTE) DEFAULT NULL,
JOB_GROUP VARCHAR2(200 BYTE) DEFAULT NULL,
DESCRIPTION VARCHAR2(250 BYTE) DEFAULT NULL,
NEXT_FIRE_TIME int,
PREV_FIRE_TIME int,
PRIORITY INTEGER NULL,
TRIGGER_STATE VARCHAR2(16 BYTE) DEFAULT NULL,
TRIGGER_TYPE VARCHAR2(8 BYTE) DEFAULT NULL,
START_TIME int,
END_TIME int,
CALENDAR_NAME VARCHAR2(200 BYTE) DEFAULT NULL,
MISFIRE_INSTR int,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
);

CREATE TABLE "HEWENFENG".QRTZ_SIMPLE_TRIGGERS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
TRIGGER_NAME VARCHAR2(200 BYTE) NULL ,
TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
REPEAT_COUNT int,
REPEAT_INTERVAL int ,
TIMES_TRIGGERED int ,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP));



CREATE TABLE "HEWENFENG".QRTZ_CRON_TRIGGERS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
TRIGGER_NAME VARCHAR2(200 BYTE) NULL ,
TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
CRON_EXPRESSION VARCHAR2(120 BYTE) NULL ,
TIME_ZONE_ID VARCHAR2(80 BYTE) NULL ,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP));

CREATE TABLE "HEWENFENG".QRTZ_SIMPROP_TRIGGERS
  (          
    SCHED_NAME VARCHAR2(120 BYTE) NULL ,
    TRIGGER_NAME VARCHAR2(200 BYTE) NULL ,
    TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
    STR_PROP_1 VARCHAR2(512 BYTE) NULL ,
    STR_PROP_2 VARCHAR2(512 BYTE) NULL ,
    STR_PROP_3 VARCHAR2(512 BYTE) NULL ,
    INT_PROP_1 INT NULL,
    INT_PROP_2 INT NULL,
    LONG_PROP_1 INT NULL,
    LONG_PROP_2 INT NULL,
    DEC_PROP_1 NUMERIC(13,4) NULL,
    DEC_PROP_2 NUMERIC(13,4) NULL,
    BOOL_PROP_1 VARCHAR2(1 BYTE) NULL ,
    BOOL_PROP_2 VARCHAR2(1 BYTE) NULL ,
    PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
    FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 
    REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP));
    
    CREATE TABLE "HEWENFENG".QRTZ_BLOB_TRIGGERS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
TRIGGER_NAME VARCHAR2(200 BYTE) NULL ,
TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
BLOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP));

CREATE TABLE "HEWENFENG".QRTZ_CALENDARS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
CALENDAR_NAME VARCHAR2(200 BYTE) NULL ,
CALENDAR BLOB NOT NULL,
PRIMARY KEY (SCHED_NAME,CALENDAR_NAME));



CREATE TABLE "HEWENFENG".QRTZ_PAUSED_TRIGGER_GRPS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
;

CREATE TABLE "HEWENFENG".QRTZ_FIRED_TRIGGERS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
ENTRY_ID VARCHAR2(95 BYTE) NULL ,
TRIGGER_NAME VARCHAR2(200 BYTE) NULL ,
TRIGGER_GROUP VARCHAR2(200 BYTE) NULL ,
INSTANCE_NAME VARCHAR2(200 BYTE) NULL ,
FIRED_TIME int NULL ,
SCHED_TIME int NULL ,
PRIORITY INTEGER NOT NULL,
STATE VARCHAR2(16 BYTE) NULL ,
JOB_NAME VARCHAR2(200) NULL,
JOB_GROUP VARCHAR2(200) NULL,
IS_NONCONCURRENT VARCHAR2(1) NULL,
REQUESTS_RECOVERY VARCHAR2(1) NULL,
PRIMARY KEY (SCHED_NAME,ENTRY_ID))
;

CREATE TABLE "HEWENFENG".QRTZ_SCHEDULER_STATE (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
INSTANCE_NAME VARCHAR2(200 BYTE) NULL ,
LAST_CHECKIN_TIME int NULL ,
CHECKIN_INTERVAL int NULL ,
PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
;

CREATE TABLE "HEWENFENG".QRTZ_LOCKS (
SCHED_NAME VARCHAR2(120 BYTE) NULL ,
LOCK_NAME VARCHAR2(40 BYTE) NULL ,
PRIMARY KEY (SCHED_NAME,LOCK_NAME))
;


CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);

CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);

CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);